package leetcode;

public class ToLower {


    public static String toLowerCase(String s){
        char[] chars = s.toCharArray();
        for (int i = 0; i < s.length(); i++) {
            if(Character.isLetter(s.charAt(i)) == false) {
                continue;
            }
            if(s.charAt(i) >= 'A'&&s.charAt(i) <= 'Z'){
                chars[i] += 32;
            }
        }
        return new String(chars);
    }

    public static void main(String[] args) {
        String s = "PiTAs";
        System.out.println(toLowerCase(s));
    }
}
